tools/libxl: fix socket display error for CMT
authorChao Peng <chao.p.peng@linux.intel.com>
Tue, 29 Sep 2015 07:49:51 +0000 (15:49 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 29 Sep 2015 09:56:12 +0000 (10:56 +0100)
commita4943f6bdd2bcef9e20020a74e41aaeb77e42905
tree49260232f8a9a11c94e83095c31a43d46976c53d
parentd0596394462484a277330b2e43f0b46efb815452
tools/libxl: fix socket display error for CMT

When displaying the CMT information for all the sockets, we assume socket
number is continuous. This is not true in the hotplug case. For instance,
when the 3rd socket is plugged out on a 4-socket system, the available
sockets numbers are 1,2,4 but current we will display the CMT
information for socket 1,2,3.

The fix is getting the socket bitmap for all the sockets on the system
first and then displaying CMT information for_each_set_bit in that bitmap.

Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
tools/libxl/xl_cmdimpl.c